<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class AddAlgorithmLangToResourcesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('resources', function (Blueprint $table) {
            $table->tinyInteger('algorithm_lang')->default(0)->comment('算法资源语言类型:MATLAB = 1,PYTHON = 2,C = 3,C_ADD_ADD = 4,C_SHARP = 5,OTHER = 6;');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('resources', function (Blueprint $table) {
            $table->dropColumn('algorithm_lang');
        });
    }
}
